#pragma once
#include "glm/glm.hpp"

namespace Orange
{
    class OrthogonaCamera
    {
    public:
        OrthogonaCamera(float left, float right, float bottom, float top);
        glm::mat4 GetViewPrejectMatrix() const { return m_ViewPrejectMatrix; };
        glm::vec3 GetCanmeraPosition() const { return m_Position; };
        float GetCanmeraRotation() const { return m_Rotation; };
        void SetPosition(const glm::vec3 &position)
        {
            m_Position = position;
            CalcViewPrejectMatrix();
        };
        void SetRotation(const float rotation)
        {
            m_Rotation = rotation;
            CalcViewPrejectMatrix();
        };

        void CalcViewPrejectMatrix();

    private:
        // set camera position  at origin
        glm::vec3 m_Position = {0.0f, 0.0f, 0.0f};
        float m_Rotation = 0.0f;
        glm::mat4 m_ViewMatrix;
        glm::mat4 m_PrejectMatrix;
        glm::mat4 m_ViewPrejectMatrix;
    };
}